package com.dyz.wsw.front.market.service.impl;

import com.dyz.wsw.front.market.dao.persist.repository.MarketCategoryRepository;
import com.dyz.wsw.front.market.pojo.entity.MarketCategory;
import com.dyz.wsw.front.market.service.CategoryService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.data.r2dbc.core.R2dbcEntityTemplate;
import org.springframework.data.relational.core.query.Criteria;
import org.springframework.data.relational.core.query.Query;
import org.springframework.stereotype.Service;
import reactor.core.publisher.Flux;

/**
 * @author dyz
 * @date 2025/1/15 15:36
 */
@Service
@Slf4j
public class CategoryServiceImpl implements CategoryService {

    private final MarketCategoryRepository marketCategoryRepository;

    public CategoryServiceImpl(MarketCategoryRepository marketCategoryRepository) {
      log.debug("创建业务类对象: CategoryServiceImpl");
      this.marketCategoryRepository = marketCategoryRepository;
    }

    @Override
    public Flux<MarketCategory> findAllCategory() {
        log.debug("开始处理【获取所有目录】的业务");
        return marketCategoryRepository.findAll();
    }
}
